package com.fly.lambda.domain;

import com.sun.istack.internal.NotNull;

import javax.persistence.*;

/**
 * Created by Fly on 2016/8/1.
 */
@Entity
@Table(name = "t_article_info")
public class Article {

    @Id
    @Column(name = "article_id", length = 32)
    private String articleId;   //文章id

    @NotNull
    @Column(name = "article_title", length = 100)
    private String articleTitle;    //文章标题

    @Column(name = "article_subtitle")
    private String articleSubtitle;     //文章副标题

    @Column(name = "article_intro")
    private String articleIntro;    //文章简介

    @Column(name = "article_content")
    @Lob
    @NotNull
    private String articleContent;  //文章内容

    @Column(name = "cover")
    private String cover;   //封面

    @Column(name = "order_num")
    @NotNull
    private int orderNum;   //排序号

    @Column(name = "author")
    private String author;  //作者

    @Column(name = "create_time")
    private String createTime;  //发布时间

    @Column(name = "page_view")
    private int pageView;   //页面浏览数

    @Column(name = "attachment")
    private String attachment;  //附件

    @Column(name = "channel_id")
    private String channelId;   //所属栏目

    @Column(name = "tags")
    private String tags;    //标签

    @Column(name = "recommend")
    private String recommend;   //是否推荐

    @Column(name = "top")
    private String top; //是否置顶

    @Column(name = "comment")
    private String comment; //是否允许评论

    @Column(name = "commentnum")
    private int commentnum; //评论数

    public String getArticleId() {
        return articleId;
    }

    public void setArticleId(String articleId) {
        this.articleId = articleId;
    }

    public String getArticleTitle() {
        return articleTitle;
    }

    public void setArticleTitle(String articleTitle) {
        this.articleTitle = articleTitle;
    }

    public String getArticleSubtitle() {
        return articleSubtitle;
    }

    public void setArticleSubtitle(String articleSubtitle) {
        this.articleSubtitle = articleSubtitle;
    }

    public String getArticleIntro() {
        return articleIntro;
    }

    public void setArticleIntro(String articleIntro) {
        this.articleIntro = articleIntro;
    }

    public String getArticleContent() {
        return articleContent;
    }

    public void setArticleContent(String articleContent) {
        this.articleContent = articleContent;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public int getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(int orderNum) {
        this.orderNum = orderNum;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getPageView() {
        return pageView;
    }

    public void setPageView(int pageView) {
        this.pageView = pageView;
    }

    public String getAttachment() {
        return attachment;
    }

    public void setAttachment(String attachment) {
        this.attachment = attachment;
    }

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getRecommend() {
        return recommend;
    }

    public void setRecommend(String recommend) {
        this.recommend = recommend;
    }

    public String getTop() {
        return top;
    }

    public void setTop(String top) {
        this.top = top;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public int getCommentnum() {
        return commentnum;
    }

    public void setCommentnum(int commentnum) {
        this.commentnum = commentnum;
    }
}
